<!DOCTYPE html>
<html lang="en">

<head>
  <!-- <base href="/h5onuacreditinstall/index.html"> -->

  <meta charset="utf-8" />
  <meta name="OnuaCredit" content="yes">
  <meta name="google" content="notranslate">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="default">
  <meta name="apple-mobile-web-app-title" content="OnuaCredit">
  <meta name="mobile-web-app-capable" content="yes">
  <meta name="viewport"
    content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
  <meta name="referrer" content="unsafe-url">
  <!-- <meta name="referrer" content="no-referrer|no-referrer-when-downgrade|origin|origin-when-crossorigin|unsafe-url"> -->
  <meta name="theme-color" content="#000000" />
  <meta name="description" content="OnuaCredit" />
  <title>OnuaCredit</title>

  <link rel="apple-touch-icon" href="/h5onuacreditinstall/logo512.png">
  <link rel="apple-touch-icon" type="image/png" sizes="57x57" href="/h5onuacreditinstall/logo57.png" />
  <link rel="apple-touch-icon" type="image/png" sizes="72x72" href="/h5onuacreditinstall/logo72.png" />
  <link rel="apple-touch-icon" type="image/png" sizes="114x114" href="/h5onuacreditinstall/logo114.png" />
  <link rel="apple-touch-icon" type="image/png" sizes="144x144" href="/h5onuacreditinstall/logo144.png" />
  <link rel="icon" sizes="192x192" href="/h5onuacreditinstall/logo192.png" />
  <link rel="icon" sizes="512x512" href="/h5onuacreditinstall/logo512.png" />

  <link rel="manifest" href="/h5onuacreditinstall/manifest.json" />


  <!-- Meta Pixel Code -->
  <!-- <script>
    !function (f, b, e, v, n, t, s) {
      if (f.fbq) return; n = f.fbq = function () {
        n.callMethod ?
          n.callMethod.apply(n, arguments) : n.queue.push(arguments)
      };
      if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0';
      n.queue = []; t = b.createElement(e); t.async = !0;
      t.src = v; s = b.getElementsByTagName(e)[0];
      s.parentNode.insertBefore(t, s)
    }(window, document, 'script',
      'https://connect.facebook.net/en_US/fbevents.js');
    fbq('init', '661444556093669');
    fbq('track', 'PageView');
  </script>
  <noscript>
    <img height="1" width="1" style="display:none"
      src="https://www.facebook.com/tr?id=661444556093669&ev=PageView&noscript=1" />
  </noscript> -->
  <!-- End Meta Pixel Code -->

  <!-- Google tag (gtag.js) -->
  <!-- <script async src="https://www.googletagmanager.com/gtag/js?id=AW-11395409665"></script>
  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag() { dataLayer.push(arguments); }
    gtag('js', new Date());
    gtag('config', 'AW-11395409665'); 
  </script> -->

  <!-- Google tag (gtag.js) -->
  <!-- <script async src="https://www.googletagmanager.com/gtag/js?id=AW-11405429565"></script>
  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag() { dataLayer.push(arguments); }
    gtag('js', new Date());
    gtag('config', 'AW-11405429565'); 
  </script> -->


  <!-- salesmartly -->
  <!-- <script src="https://assets.salesmartly.com/js/project_32313_33758_1701248491.js"></script> -->

  <!-- <script>
    window.fbAsyncInit = function () {
      FB.init({
        appId: '661444556093669',
        cookie: true,
        xfbml: true,
        version: 'v18.0'
      });

      FB.AppEvents.logPageView();

    };

    (function (d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) { return; }
      js = d.createElement(s); js.id = id;
      js.src = "https://connect.facebook.net/en_US/sdk.js";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
  </script> -->



  <!-- <script src="https://as.alipayobjects.com/g/component/fastclick/1.0.6/fastclick.js"></script> -->

  <script>
    // if ('addEventListener' in document) {
    //   document.addEventListener('DOMContentLoaded', function () {
    //     FastClick.attach(document.body);
    //   }, false);
    // }
    // if (!window.Promise) {
    //   document.writeln('<script src="https://as.alipayobjects.com/g/component/es6-promise/3.2.2/es6-promise.min.js"' + '>' + '<' + '/' + 'script>');
    // }

    // window.addEventListener("beforeinstallprompt", function installReady(e) {
    //   console.log(e)
    //   e.preventDefault();
    //   window.canAddHomeEvent = e;
    // });

    const isInstalledPWA = window.matchMedia('(display-mode: window-controls-overlay)').matches ||
      window.matchMedia('(display-mode: standalone)').matches;

    window.addEventListener('appinstalled', () => {
      let event = new Event('onAppDidInstalled');
      window.dispatchEvent(event)
      console.log("found: appinstalled");
    });

    if (!isInstalledPWA) {
      console.log("isInstalledPWA: false");
      window.addEventListener('beforeinstallprompt', e => {
        console.log(e);
        e.preventDefault();
        window.canAddHomeEvent = e;
      });
    }

    if (navigator.serviceWorker) {
      console.log("Will the service worker register");
      navigator.serviceWorker.register('/h5onuacreditinstall/pwabuilder-sw.js');
    } else {
      console.log("Will not open service worker");
    }

    function adapter() {
      //获取手机横向的设备独立像素
      const dip = document.documentElement.clientWidth
      //计算根字体大小(100是我们自己指定的，375是设计稿宽度)
      const rootFontSize = dip / 10
      //设置根字体
      document.documentElement.style.fontSize = rootFontSize + 'px'
    }
    adapter()

    window.onresize = adapter
  </script>
</head>

<body>
  <div id="root"></div>
</body>

</html>